/**
 * 格式化时间
 * @returns {string}
 */
export function dateFormat (nowDate = new Date()) {
    // var day = new Date(nowDate.getFullYear(), nowDate.getMonth() + 1, 0);
    var day = nowDate;
    return day.getFullYear() + "-" +
        ((day.getMonth() + 1) >= 10 ? (day.getMonth() + 1) : ('0' +(day.getMonth() + 1))  )
        + "-" +
        (day.getDate() > 10 ? day.getDate() : ('0' +day.getDate()));
}